﻿using UnityEngine;
using System.Collections;

public class TimeData :DataBase
{
    public float time;
}

public class TimeDataItem : DataItem {

    private TimeControl timeCtrl;
    public TimeDataItem()
    {
        item = new TimeData();
    }

    public override void Start()
    {
        base.Start();
        timeCtrl = GetComponent<TimeControl>();

    }
    public override void Load(DataBase data)
    {
        timeCtrl.Timer = ((TimeData)data).time;
    }

    public override void Save()
    {
        ((TimeData)item).time = timeCtrl.Timer;
    }

    

}
